package com.taotao.manager.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.abel533.entity.Example;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.taotao.common.bean.EasyUIResult;
import com.taotao.manager.mapper.ItemParamMapper;
import com.taotao.pojo.TbItemParam;

@Service
public class ItemParamService extends BaseService<TbItemParam> {

	@Autowired
	private ItemParamMapper itemParamMapper;
	
	public EasyUIResult queryItemParamList(int pages, int rows) {
		PageHelper.startPage(pages, rows);
		Example example = new Example(TbItemParam.class);
		example.setOrderByClause(" created DESC ");
		List<TbItemParam> itemParams = this.itemParamMapper.selectByExample(example);
		PageInfo<TbItemParam> pageInfo = new PageInfo<TbItemParam>(itemParams);
		return new EasyUIResult(pageInfo.getTotal(), pageInfo.getList());
	}

}
